extends StateBase


func enter():
	ownerNode.showSelectCell()
	

func exit():
	pass


func run(delta):
	ownerNode.processSelectCell(delta)
	ownerNode.processCamMove(delta)
	processSelectHero()
	

func processSelectHero():
	if Input.is_action_just_pressed("mouse_left_button"):
		var hero = ownerNode.trySelectHero()
		if hero == null: return
		
		hero.processSelect()
		ownerNode.currentSelectedHeroInst = hero
		ownerNode.stateMachine.clearAndAddState(Consts.battleFieldStateHeroRoundReady2Move)
		
		
		
	

